<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<script src="/user/js/jquery.js"></script>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<title>会员中心</title>
<link rel="stylesheet" type="text/css" href="/skin/css/amazeui.min1.css" />
<link rel="stylesheet" type="text/css" href="/skin/css/app.css?v=5.05" />
<script>
	
</script>
</head>
<body style="padding-top:0; background:#f5f7fb;">
	<style>
		/* 设计稿 375px，1rem = 100px，换算方法：px值 ÷ 100 = rem值，例如：12px = 0.12rem, 14px = 0.14rem */
		a{-webkit-tap-highlight-color:transparent;outline:none;}
		.profile-hero{position:relative;background:url('/skin/img/user_background.png') center/cover no-repeat;border-bottom-left-radius:0.14rem;border-bottom-right-radius:0.14rem;overflow:hidden;min-height:1.8rem;padding-top:0.1rem;}
		.profile-hero::after{content:'';position:absolute;bottom:0;left:0;right:0;height:0.2rem;background:linear-gradient(to bottom, rgba(255,255,255,0), rgba(245,247,251,1));pointer-events:none;}
		.profile-hero .topbar{display:flex;justify-content:flex-end;gap:0.12rem;padding:0.14rem 0.14rem 0;position:relative;z-index:1}
		.profile-hero .topbar a{width:0.34rem;height:0.34rem;background:rgba(255,255,255,.08);backdrop-filter:blur(0.04rem);border-radius:0.18rem;display:flex;align-items:center;justify-content:center}
		.profile-hero .profile{display:flex;align-items:center;gap:0.14rem;padding:0.2rem 0.16rem 0.25rem 0.2rem;position:relative;z-index:1}
		.profile-hero .avatar{width:0.56rem;height:0.56rem;border-radius:50%;overflow:hidden;border:0.02rem solid rgba(255,255,255,.35)}
		.profile-hero .avatar img{width:100%;height:100%;object-fit:cover}
		.profile-hero .greet{color:#2A3139 ;font-size:0.18rem;font-weight:700;line-height:1.4}
		.profile-hero .level{margin-top:0.06rem;color:#2A3139 ;font-size:0.13rem;font-weight:500}
	.stats{display:flex;color:#2A3139 ;position:relative;z-index:1;padding:0 0.16rem;}
	.stats .item{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.08rem;color:#2A3139;box-sizing:border-box;}
	.stats .item a{color:#2A3139 ;text-decoration:none;display:block;width:100%;text-align:center;}
	.stats .val{font-size:0.2rem;font-weight:900;color:#2A3139 ;line-height:1.2;white-space:nowrap;}
	.stats .lab{font-size:0.12rem;color:#2A3139;opacity:1;white-space:nowrap;}

		.order-strip{display:flex;gap:0.14rem;justify-content:space-between;background:#fff;margin:0 0.16rem 0.12rem;margin-top:0;border-radius:0.06rem;padding:0.16rem 0.08rem;box-shadow:0 0.08rem 0.24rem rgba(15,23,42,.06)}
		.order-strip a{flex:1;display:flex;flex-direction:column;align-items:center;gap:0.08rem;color:#2A3139 ;text-decoration:none}
		.order-strip .ico{width:0.41rem;height:0.41rem;border-radius:0.12rem;display:flex;align-items:center;justify-content:center;color:#254834;font-weight:800}
		.order-strip .ico img{width: 100%;object-fit: contain;}
		.order-strip p{font-size:0.12rem;color:#2A3139 ;font-weight:400}

		.list-card{background:#fff;margin:0 0.16rem 0.12rem;border-radius:0.06rem;overflow:hidden;box-shadow:0 0.08rem 0.24rem rgba(15,23,42,.06)}
		.list-row{display:flex;align-items:center;justify-content:space-between;padding:0.16rem;border-top:0.01rem solid #f1f5f9;text-decoration:none}
		.list-row:first-child{border-top:none}
		.list-row .l{display:flex;align-items:center;gap:0.12rem;color:#2A3139 }
		.list-row .l > div:not(.dot){font-size:0.14rem;font-weight:400;color:#2A3139 }
		.list-row .l .dot{width:0.28rem;height:0.28rem;border-radius:0.08rem;display:flex;align-items:center;justify-content:center;color:#254834;font-weight:800}
		.list-row .l .dot img{width:0.2rem;height:0.2rem;object-fit:contain}
		.list-row .r img{width:0.14rem;height:0.14rem;opacity:0.5}

		.invite-banner{margin:0.12rem;border-radius:0.12rem;overflow:hidden}
		.invite-banner img{display:block;width:100%;height:auto}
	</style>

	<div class="profile-hero">
		<!-- <div class="topbar">
			<a href="fankui.php"><img src="/skin/img/ico_xx.png" alt="" /></a>
			<a href="edit.php"><img src="/skin/img/ico_sz.png" alt="" /></a>
		</div> -->
		<div class="profile">
			<div class="avatar"><a href="edit.php"><img src="/skin/img/tx.png" alt="" /></a></div>
			<div>
				<div class="greet">你好，{$info[tname]}</div>
				<!-- {$info[uname]} -->
				<div class="level">
					{if($info['tlevel']>0)}{$tdarr1[$info[tlevel]]}{else}{$tdarr[$info[level]]}{/if}
				</div>
			</div>
		</div>
		<div class="stats">
			<!-- <a class="item" href="coupons.php" style="color:#000;text-decoration:none">
				<div class="val">0</div><div class="lab">卡券</div>
			</a> -->
			<div class="item"><div class="val">0</div><div class="lab">收藏</div></div>
			<!-- <div class="item"><div class="val">0</div><div class="lab">积分</div></div> -->
			<a class="item" href="cashrecord.php" style="color:#000;text-decoration:none">
				<div class="val" id="earnings">{$info[jjcash]}</div><div class="lab">收益</div>
			</a>
			<a class="item" href="cashrecord.php" style="color:#000;text-decoration:none">
				<div class="val" id="totalearnings">{$info[jjcash1]}</div><div class="lab">累计收益</div>
			</a>
			<a class="item" href="cwrecord.php" style="color:#000;text-decoration:none">
				<div class="val" id="allmoney">{$info[cash]}</div><div class="lab">余额</div>
			</a>
		</div>
	</div>

	<div class="order-strip">
		<a href="orderlist.php?type=2" target="_self"><div class="ico"><img src="/skin/img/icon_all.png" alt="" /></div><p>全部</p></a>
		<a href="orderlist.php?type=2&state=2" target="_self"><div class="ico"><img src="/skin/img/icon_shipment.png" alt="" /></div><p>{$osarr2[2]}</p></a>
		<a href="orderlist.php?type=2&state=3" target="_self"><div class="ico"><img src="/skin/img/icon_receipt.png" alt="" /></div><p>{$osarr2[3]}</p></a>
		<a href="orderlist.php?type=2&state=4" target="_self"><div class="ico"><img src="/skin/img/icon_success.png" alt="" /></div><p>{$osarr2[4]}</p></a>
	</div>

	<div class="list-card">
		<a class="list-row" href="address.php">
			<div class="l"><div class="dot"><img src="/skin/img/icon_address_edit.png" alt="" /></div><div>我的地址</div></div>
			<div class="r"><img src="/skin/img/icon_arrow.png" alt="" /></div>
		</a>
		<a class="list-row" href="edit.php">
			<div class="l"><div class="dot"><img src="/skin/img/icon_setting.png" alt="" /></div><div>设置</div></div>
			<div class="r"><img src="/skin/img/icon_arrow.png" alt="" /></div>
		</a>
		<a class="list-row" href="/user/invitation_center.php">
			<div class="l"><div class="dot"><img src="/skin/img/icon_share.png" alt="" /></div><div>邀请中心</div></div>
			<div class="r"><img src="/skin/img/icon_arrow.png" alt="" /></div>
		</a>
		<a class="list-row" href="/user/fankui.php">
			<div class="l"><div class="dot"><img src="/skin/img/icon_customer.png" alt="" /></div><div>联系客服</div></div>
			<div class="r"><img src="/skin/img/icon_arrow.png" alt="" /></div>
		</a>
		<!-- <a class="list-row" href="javascript:" onclick="logout()">
			<div class="l"><div class="dot"><img src="/skin/img/ico_logout.png" alt="" /></div><div>退出账户</div></div>
			<div class="r">›</div>
		</a>
		<a class="list-row" href="/infolist.php">
			<div class="l"><div class="dot"><img src="/skin/img/ico_news.png" alt="" /></div><div>平台公告</div></div>
			<div class="r">›</div>
		</a>
		<a class="list-row" href="team.php">
			<div class="l"><div class="dot"><img src="/skin/img/ico_team.png" alt="" /></div><div>我的团队</div></div>
			<div class="r">›</div>
		</a> -->
	</div>

	<div class="invite-banner">
		<a href="/user/erweima/share.php"><img src="/skin/img/invitation.png" alt="" /></a>
	</div>

	<script>

	function logout(){
			$.ajax({
				type:"post",
				dataType:"json",
				url:"/Moudelu.php?m=m&a=logout",
				success:function(d){
					if(d[0]==0){
						alert(d[1]);
					}
					else{
						alert(d[1]);
						window.location.href='/index.php';
					}
				}
			});
		}
	</script>
	<script>
		// 格式化金额
		function formatMoney(money) {
			// 转换为数字并去掉小数
			var num = Math.floor(parseFloat(money));
			
			// 如果大于等于10000，转换为万
			if (num >= 10000) {
				var wan = num / 10000;
				// 保留一位小数，如果小数为0则不显示
				if (wan % 1 === 0) {
					return Math.floor(wan) + '万';
				} else {
					// 不四舍五入，直接截断到一位小数
					return (Math.floor(wan * 10) / 10) + '万';
				}
			}
			
			return num;
		}
		
		$(function () {
			$(".yh-nav li:nth-child(4)").addClass("active");
			
			// 格式化余额及收益显示
			var money = $('#allmoney').text();
			$('#allmoney').text(formatMoney(money));
			
			var earnings = $('#earnings').text();
			$('#earnings').text(formatMoney(earnings));
			
			var totalearnings = $('#totalearnings').text();
			$('#totalearnings').text(formatMoney(totalearnings));
		});
		(function(){
		var docEl = document.documentElement;
		var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
		function recalc() {
			var clientWidth = docEl.clientWidth;
			if (!clientWidth) return;
			// 设计稿 375px，1rem = 100px，方便换算：12px = 0.12rem, 14px = 0.14rem（px值 ÷ 100 = rem值）
			// 在 375px 屏幕上：1rem = 100px；在其他屏幕上按比例缩放
			docEl.style.fontSize = (clientWidth / 375 * 100) + 'px';
		}
		if (!document.addEventListener) return;
		window.addEventListener(resizeEvt, recalc, false);
		document.addEventListener('DOMContentLoaded', recalc, false);
		recalc();
	})();
	</script>
	{include(foot)}
</body>
</html>